import javax.swing.*;

public class worker extends Staff{
    public worker(String name, double salary, int days, double grade) {
        super(name, salary, days, grade);
    }
    public double getSal() {
        return getSalary()*getGrade()*getDays();
    }

    @Override
    public void print() {
        super.print();
        System.out.println(getSal());
    }
}
